// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router/router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/global.css'
import './assets/font/iconfont.css'
import axios from 'axios'
import './config/constant'

Vue.prototype.$http = axios
axios.defaults.baseURL = 'http://localhost:8090/'
//配置拦截器
axios.interceptors.request.use(config => {
  config.headers.token = window.sessionStorage.getItem(this.tokenName)
  return config
})
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.prototype.$message = ElementUI['Message']

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
